home *** CD-ROM | disk | FTP | other *** search
- Path: sun.uakom.sk!usenet
- From: "Billik Stefan - 2.PEF" <billik@sun.uniag.sk>
- Newsgroups: comp.lang.c
- Subject: curses.h <-- getch() ?
- Date: Wed, 17 Apr 1996 18:16:49 -0100
- Organization: FVS PEF VSP in NItra
- Message-ID: <317543A1.75A8@sun.uniag.sk>
- NNTP-Posting-Host: sun.uniag.sk
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (X11; I; SunOS 5.4 sun4m)
-
- My problem is that this program don't like our cc && gcc compilers:
-
- -------------------------
- /* It should do this thing:
- after eighth character it should print it on screen
- - means without <ENTER>
- */
-
- #include <stdio.h>
- #include <string.h>
- #include <signal.h>
- #include <curses.h>
-
- main()
- {
-
- char ch[9];
- int i;
-
- printf("\n Press 8 characters ... \n");
-
- for ( i=0 ; i<=8 ; i++ )
- ch[i]=getch();
- printf("\n %s \n", ch[0]);
-
- }
-
- -------------------------
- During compilation:
-
- 18:02 /usr1/users/student/billik/C/$ cc c/getstring.c
- Undefined first referenced
- symbol in file
- wgetch getstring.o
- stdscr getstring.o
- ld: fatal: Symbol referencing errors. No output written to a.out
- 18:02 /usr1/users/student/billik/C/$
-
- also with gcc.
- What do you think ?
- --
- \\|// \\|//
- (o o) http://sai.uniag.sk/~billik (o o)
- -ooO-(_)-Ooo-------------------------------------------ooO-(_)-Ooo-
- billik@sun.uniag.sk
- steve.
- PS: The best way to explain is example.
-
- PS1: SunOS 5.4
- PS2: cc:
- ld: Software Generation Utilities (SGU) SunOS/ELF (LK-1.4 (S/I))
- gcc: gcc version 2.6.3
-